package com.huangliusong.desigin.pattern.structual.composite;

/**
 * @author huangliusong
 * @since 2018/10/12
 * {@link }
 */
public class Test {
    public static void main(String[] args) {
        CatalogComponent linuxCourse=new Course("linux课程",11);
        CatalogComponent winCourse=new Course("win课程",33);
        CatalogComponent javaCourseCatalog=new CourseCatalog("java课程目录",2);


        CatalogComponent mmallCoursee1=new Course("java 电商一期",44);
        CatalogComponent mmallCoursee2=new Course("java 电商2期",144);
        CatalogComponent mmallCoursee3=new Course("java 谁见模式",144);
        javaCourseCatalog.add(mmallCoursee1);
        javaCourseCatalog.add(mmallCoursee2);
        javaCourseCatalog.add(mmallCoursee3);



        CatalogComponent  imoocMainCourseCatelog=new CourseCatalog("慕课网课程主目录",1);


        imoocMainCourseCatelog.add(linuxCourse);
        imoocMainCourseCatelog.add(winCourse);
        imoocMainCourseCatelog.add(javaCourseCatalog);


        imoocMainCourseCatelog.print();

    }
}
